package com.lottery.material.service.portal.user;


import com.lottery.material.pojo.portaluser.PortalUserInfo;
import com.lottery.material.util.ResponseResult;
import com.lottery.material.vo.portal.article.ArticleUserVo;
import com.lottery.material.vo.portal.transaction.EarnRecordStatisticsVo;
import com.lottery.material.vo.portal.user.AccountAndSecurityVo;
import com.lottery.material.vo.portal.user.AuthenticationUserVo;
import com.lottery.material.vo.portal.user.FollowUserVo;
import com.lottery.material.vo.portal.user.UserVo;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface PortalUserInfoService {
    void insertSelective(PortalUserInfo portalUserInfo);
    PortalUserInfo findById(Integer id);

    /**
     * 根据手机号和用户状态查用户
     * Author jy
     * @param phoneNumber
     * @param userStatus
     * @return
     */
    PortalUserInfo findByLoginPhoneNumberAndUserStatusNot(String phoneNumber, Integer userStatus);

    /**
     * 根据UserId查用户
     * Author jy
     * @param userId
     * @return
     */
    PortalUserInfo findByUserId(String userId);

    /**
     * 根据主键更新用户
     * @param record
     * @return
     */
    Integer updateByPrimaryKeySelective(PortalUserInfo record);

    UserVo findMyPortalUserInfoDtoByUserId(String userId);

    /**
     * 根据userId查用户
     * @Author jy
     * @param userId
     * @return
     */
    Map<String,Object> findPortalUserInfoDtoByUserId(String userId);

    /**
     * 根据userId查文章作者信息
     * @Author jy
     * @param userId
     * @return
     */
    ArticleUserVo findArticleUserVoByUserId(String userId);

    /**
     * 查询关注列表
     * @Author 焦阳
     * @param userId
     * @return
     */
    List<FollowUserVo> findFollowUserListByUserId(String userId,Integer page);

    /**
     * 查询粉丝列表
     * @Author 焦阳
     * @param userId
     * @return
     */
    List<FollowUserVo> findFansUserListByUserId(String userId,Integer page);

    /**
     * 查询个人财富
     * @param userId
     * @return
     */
    Map<String, Object> findMyTreasure(String userId);

    Map<String, Object> findRechargeList(String userId);
    /**
     * description: 用户金币支付业务逻辑
     * author sunny
     * createDate 2019-04-17 下午 2:14
     * @param portalUserInfo
     * @param reqParamMap
     * @return
     */
    ResponseResult insertUserGoldPayRecord(PortalUserInfo portalUserInfo, Map<String, String> reqParamMap);

    /**
     * 查询常规认证
     * @param userId
     * @return
     */
    AuthenticationUserVo findUserAuthentication(String userId);

    ResponseResult confirmAuthentication(String userId);

    /**
     * 查询个人收益
     * @Author 焦阳
     * @param userId
     * @return
     */
    EarnRecordStatisticsVo findIncomeStatisticsByUserId(String userId);

    /**
     * 账户与安全
     * @Author 焦阳
     * @param userId
     * @return
     */
    AccountAndSecurityVo findAccountAndSecurity(String userId);

    ResponseResult sendVerificationCode(Map<String,String > map) throws IOException;

    ResponseResult editWatchRxpertAndCircle(String userIds,String circleIds,String userId);

    Map<String,String> addUser(String phoneNumber,String password, String channelCode) throws Exception;

    /**
     * description: 获取被推荐用户信息
     * author sunny
     * createDate 2019-05-15 上午 9:40
     * @return
     * @throws Exception
     */
    List<Map<String, Object>> findRecommendUser() throws Exception;
}
